#ifndef HISTOGRAMMANAGER_H
#define HISTOGRAMMANAGER_H

#include <QtCharts>
#include <QTimer>
#include <QBarSeries>
#include <QObject>
using namespace QtCharts;
class HistogramManager : public QObject
{
    Q_OBJECT
public:
    explicit HistogramManager(QObject *parent = nullptr);
    void setTitle(const QString& title = "");
    void setAxisX(const  QStringList& categories,uint16_t gridDensity = 0);
    void setData(QBarSeries * , int max = 0);
    QChart *getChart();
signals:
    void signChartClicked(QString);
public slots:

private:
    QChart * chart;
    QBarCategoryAxis *axiList;
};

#endif // HISTOGRAMMANAGER_H
